`include "chunjun_define.sv" 
`include "chunjun_lib_define.sv" 
 
 
//--------------------------------------------------//
//------------------bin2onehot----------------------//
//--------------------------------------------------//
module wing_cbb_bin2onehot #(
    parameter WIDTH = 8
) (
    input  logic [$clog2(WIDTH)-1 : 0]   bin_i,
    output logic [WIDTH-1 : 0]           onehot_o
);

for (genvar i=0; i<WIDTH; i++) begin : G_ONEHOT
    assign onehot_o[i] = (bin_i==i);
end
 
endmodule

`include "chunjun_undefine.sv" 
